home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
A-B
/
001. Sample.cpt
/
Sample.h
< prev
next >
Wrap
Text File
|
1988-08-01
|
4KB
|
99 lines
/*------------------------------------------------------------------------------
#
# Apple Macintosh Developer Technical Support
#
# MultiFinder-Aware Simple Sample Application
#
# Sample
#
# Sample.h - Rez and C Include Source
#
# Copyright © 1988 Apple Computer, Inc.
# All rights reserved.
#
# Versions: 1.0 8/88
#
# Components: Sample.p August 1, 1988
# Sample.c August 1, 1988
# Sample.r August 1, 1988
# Sample.h August 1, 1988
# PSample.make August 1, 1988
# CSample.make August 1, 1988
#
# Sample is an example application that demonstrates how to
# initialize the commonly used toolbox managers, operate
# successfully under MultiFinder, handle desk accessories,
# and create, grow, and zoom windows.
#
# It does not by any means demonstrate all the techniques
# you need for a large application. In particular, Sample
# does not cover exception handling, multiple windows/documents,
# sophisticated memory management, printing, or undo. All of
# these are vital parts of a normal full-sized application.
#
# This application is an example of the form of a Macintosh
# application; it is NOT a template. It is NOT intended to be
# used as a foundation for the next world-class, best-selling,
# 600K application. A stick figure drawing of the human body may
# be a good example of the form for a painting, but that does not
# mean it should be used as the basis for the next Mona Lisa.
#
# We recommend that you review this program or TESample before
# beginning a new application.
------------------------------------------------------------------------------*/
/* these #defines correspond to values defined in the Pascal source code.
Sample.c includes this file. */
#define kMinSize 22 /* application's minimum size (in K) */
/* we looked at a heap dump while the program was running */
/* it was using about 14K; we added 8K for stack & 0K for
scraps as Sample has no edit capability */
#define kPrefSize 26 /* application's preferred size (in K) */
/* we made this (preferred) size bigger than the other (minimum) size */
/* so you can have more stack */
#define rMenuBar 128 /* application's menu bar */
#define rAboutAlert 128 /* about alert */
#define rWindow 128 /* application's window */
#define rStopRect 128 /* rectangle for Stop light */
#define rGoRect 129 /* rectangle for Go light */
/* SysEnvironsVersion is passed to SysEnvirons to tell it which version of the
SysEnvRec we understand. */
#define sysEnvironsVersion 1
/* OSEvent is the event number of the suspend/resume and mouse-moved events sent
by MultiFinder. Once we determine that an event is an osEvent, we look at the
high byte of the message sent to determine which kind it is. To differentiate
suspend and resume events we check the resumeMask bit. */
#define osEvent app4Evt /* event used by MultiFinder */
#define suspendResumeMessage 1 /* high byte of suspend/resume event message */
#define resumeMask 1 /* bit of message field for resume vs. suspend */
#define mouseMovedMessage 0xFA /* high byte of mouse-moved event message */
/* The following constants are used to identify menus and their items. The menu IDs
have an "m" prefix and the item numbers within each menu have an "i" prefix. */
#define mApple 128 /* Apple menu */
#define iAbout 1
#define mFile 129 /* File menu */
#define iNew 1
#define iClose 4
#define iQuit 12
#define mEdit 130 /* Edit menu */
#define iUndo 1
#define iCut 3
#define iCopy 4
#define iPaste 5
#define iClear 6
#define mLight 131 /* Light menu */
#define iStop 1
#define iGo 2
/* ExtremeNeg and ExtremePos are used to set up wide open rectangles and regions. */
#define extremeNeg -32768
#define extremePos 32767 - 1 /* required to address an old region bug */